<?php
Access-Control-Allow-Origin:*
$username = $_GET["username"];
$password = $_GET["password"];
if(!$username || !$password){
      die('{"type":"error", "msg" : "参数不足"}');
}
require("./link.php");
$password = md5($password);
$insert_sql = "INSERT INTO `jdregist` VALUES ('$username' , '$password' , null)";
$res = mysqli_query( $con , $insert_sql);
if(!$res){
      die('{"type":"error", "msg" : "数据库错误" , "detail" : "'. mysqli_error($con) .'"}');
}
echo '{"type":"success", "msg" : "恭喜注册成功"}';
mysqli_close($con);
// echo 1; 